Skip to content

Explicit cancelations#107

Merged
antonholmberg merged 4 commits intospotify:masterfrom
antonholmberg:explicit-cancelations
Feb 23, 2026
Merged

Explicit cancelations#107
antonholmberg merged 4 commits intospotify:masterfrom
antonholmberg:explicit-cancelations

Conversation

@antonholmberg
Copy link
Contributor

Distinguish user cancellations from technical errors with Type.CANCELLED

Add new AuthorizationResponse.Type.CANCELLED to differentiate user-initiated
cancellations (browser closed, back button pressed) from technical errors
(malformed responses, missing data).

Previously, both scenarios returned Type.EMPTY with RESULT_OK, making it
impossible for client apps to distinguish between them. Now:

  • Type.CANCELLED → RESULT_CANCELED (user explicitly cancelled)
  • Type.EMPTY → RESULT_OK (technical error, malformed response)
  • Type.ERROR → RESULT_OK (OAuth error like access_denied)

antonholmberg and others added 2 commits February 23, 2026 12:13
Add new AuthorizationResponse.Type.CANCELLED to differentiate user-initiated
cancellations (browser closed, back button pressed) from technical errors
(malformed responses, missing data).

Previously, both scenarios returned Type.EMPTY with RESULT_OK, making it
impossible for client apps to distinguish between them. Now:

- Type.CANCELLED → RESULT_CANCELED (user explicitly cancelled)
- Type.EMPTY → RESULT_OK (technical error, malformed response)
- Type.ERROR → RESULT_OK (OAuth error like access_denied)

This allows client applications to handle user cancellations differently
from technical failures.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@antonholmberg antonholmberg merged commit b56a328 into spotify:master Feb 23, 2026
1 check passed
@antonholmberg antonholmberg deleted the explicit-cancelations branch February 23, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants